// import { createRoot } from 'react-dom/client'
// 老版本render
import { render } from 'react-dom'
//导入 antd 样式文件
import 'antd/dist/antd.min.css'
// 全局国际化配置
import { ConfigProvider } from 'antd'
// 中文语言包
import 'moment/locale/zh-cn'
import zhCN from 'antd/lib/locale/zh_CN'

//自己编写样式
import './index.scss'
import App from './App'
import reportWebVitals from './reportWebVitals'
// 集成redux
import { Provider } from 'react-redux'
import store from './store'

//新方法
// createRoot(document.getElementById('root')).render(
//   <Provider store={store}>
//     <ConfigProvider locale={zhCN}>
//       <App />
//     </ConfigProvider>
//   </Provider>
// )

//老方法
render(
  <Provider store={store}>
    <ConfigProvider locale={zhCN}>
      <App />
    </ConfigProvider>
  </Provider>,
  document.getElementById('root')
)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals()
